package com.cocola.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserTest {

    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private Integer age;
    private String email;

    // ==>  Preparing: INSERT INTO user ( name, age, email, create_time, update_time ) VALUES ( ?, ?, ?, ?, ? )
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


    // ==>  Preparing: UPDATE user SET name=?, update_time=? WHERE id=?
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    @Version
    private Integer version;

    @TableLogic
    private Integer deleted;
}
